home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Include / errcode.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-03  |  935 b   |  29 lines

  1. #ifndef Py_ERRCODE_H
  2. #define Py_ERRCODE_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. /* Error codes passed around between file input, tokenizer, parser and
  8.    interpreter.  This is necessary so we can turn them into Python
  9.    exceptions at a higher level.  Note that some errors have a
  10.    slightly different meaning when passed from the tokenizer to the
  11.    parser than when passed from the parser to the interpreter; e.g.
  12.    the parser only returns E_EOF when it hits EOF immediately, and it
  13.    never returns E_OK. */
  14.  
  15. #define E_OK        10    /* No error */
  16. #define E_EOF        11    /* End Of File */
  17. #define E_INTR        12    /* Interrupted */
  18. #define E_TOKEN        13    /* Bad token */
  19. #define E_SYNTAX    14    /* Syntax error */
  20. #define E_NOMEM        15    /* Ran out of memory */
  21. #define E_DONE        16    /* Parsing complete */
  22. #define E_ERROR        17    /* Execution error */
  23. #define E_INDENT    18    /* Invalid indentation detected */
  24.  
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif /* !Py_ERRCODE_H */
  29.